Cisco交换机如何设置?设置步骤有哪些? | 您所在的位置:网站首页 › vtp version2 › Cisco交换机如何设置?设置步骤有哪些? |
1 , 设置交换机名称 (config)#hostname hostname 2,设置log存放路径 (config)#logging 10.7.68.68 //将log档文件存在10.7.68.68 (config)#spanning-tree mode rapid-pvst // 设定 spanning-tree 的模式是 rapid-pvst 3,设置errdisable (config)#errdisable recovery cause all //开启errdiable 恢复的原因 (config)#errdisable recovery interval 300 //errdisable后300秒恢复 4,设置snmp-server (config)#snmp-server community askeymis RO //设置简单网络管理协议字符串为只读 5, 设置vtp (config)#vtp domain askey // 设定VTP domain 名称 (config)vtp mode transparent // 设定 VTP 模式为透明模式 Vlan 1,创建Vlan (config)#vlan 180 //创建Vlan ID号为180 (config-vlan)#name askey //Vlan 名称为askey 2,删除Vlan (config)#no vlan 180 #show vlan brief //查看交换机当前Vlan 号及Vlan 下有哪些端口 3,配置管理IP (config)#int vlan 180 (config-if)#ip address 192.168.1.251 255.255.255.0 //设置管理IP地址 (config)#ip default-gateway 192.168.1.254 //设置默认路由,供其他网段访问 4,将端口划至Vlan 180 4.1单一端口划分 (config)#int f0/1 //进入端口f0/1 (config-if)#sw mode access //设置访问模式 (cofnig-if)#sw ac vlan 180 //将其端口划入Vlan 180 4.2多端口划分 (config)#int range f0/1 _ 24 //端口范围为1-24 (config-if-range)#sw mode access (config-if-range)#sw ac vlan 180 端口配置 1,端口配置 (cofnig)#interface FastEthernet0/1 (config-if)#switchport access vlan 33 // 划分VLAN (config-if)# switchport mode access (config-if)# switchport port-security maximum 2 //设定端口只允许接入2个PC (config-if)# switchport port-security // 启用端口安全 (config-if)# switchport port-security violation restrict // 发生违例 端口进errdisable,并记录 (config-if)# storm-control broadcast level 0.80 //控制广播包的突发百分比 (config-if)# storm-control action shutdown //暴风控制的违例时端口进入errdisable (config-if)# storm-control action trap //产生snmp trap(抑制)消息来通告发生过量流量的情况 (config-if)# spanning-tree portfast // 配置接口为portfast模式 (config-if)# spanning-tree bpduguard enable // 启用bpuguard 防护 (config-if)# spanning-tree guard root // 启用根桥防护 设置时间与同步 1 , 开启debug与log记录时间的服务 (config)#Service timestamps debug datetime localtime //开启debug记录时显示的时间 (config)#Service timestamps log datetime localtime //开启log记录时显示的时间 2,设置时间与时区 (config)# Clock timezone TAIWAN 8 //设置时区 (config)# Clock set 12:16:50 nov 27 2008 //设置时间(月,日,年) #Show clock //查看交换机当前的时间 3,设置ntp server 实现时间同步 (config)# ntp server 10.1.71.249 //设置交换机与ntp server 实现时间同步 #show ntp stauts //查看交换机是否同步 Clock is synchronized, stratum 3, reference is 10.1.71.249(同步) nominal freq is 119.2092 Hz, actual freq is 119.2093 Hz, precision is 2**17 reference time is CCD89F21.ECA0C247 (12:22:57.924 TAIWAN Thu Nov 27 2008) clock offset is 8.4785 msec, root delay is 399.51 msec root dispersion is 937.29 msec, peer dispersion is 885.30 msec Password 1,开启明文密码加密服务 (config)#service password-encryption //将明文密码加密 2,设置控制台密码 (config)#line consloe 0 //进入控制台 (config-line)#login //登录 (config-line)#password cisco //设置密码 3,设置enable密码 (config)#enable password cisco (config)#enable secret password cisco //给密码加密码 ,优先级高于enable password 4,设置Telnet 密码 (config)#line vty 0 4 //进入vty模式 (config-line)#login (config-line)#password cisco //设置密码 (config-line)#exec-timeout 5 0 //telnet 5分钟超时。 参考如下:switch(config)#vtp domain xx 配置VTP的域,交换机要在一个域里面 switch(config)# vtp mode server | client | transparent (三种模式server client transparent 透明模式) switch (config) # vtp password xxxx 设置vtp的密码 switch (config) # vtp version 2(默认是版本1) 欢迎分享,转载请注明来源:内存溢出 原文地址:https://outofmemory.cn/tougao/6074641.html |
CopyRight 2018-2019 实验室设备网 版权所有 |